﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using FluentValidation;
using CashFlow.ShopManage.Models.Appointment;
using CashFlow.ShopManage.Common;

namespace CashFlow.ShopManage.Validator.Appointment
{
    public class QueryAppointmentInfoModelValidator 
        : AbstractValidator<QueryAppointmentInfoModel>
    {
        public QueryAppointmentInfoModelValidator()
        {
            CascadeMode = CascadeMode.Stop;
            RuleFor(x => x.Date).Must(x => RegExpTool.IsDate(x))
                .WithMessage("日期格式不正确！");
        }
    }
}